//  getToken, setToken, removeToken, saveUserInfo, loadUserinfo
export function getToken() {
    return window.sessionStorage.getItem('token')
}

export function setToken(token) {
    window.sessionStorage.setItem('token', token)
}

export function removeToken() {
    window.sessionStorage.removeItem('token')
}

export function saveUserInfo(userInfo) {
    window.sessionStorage.setItem('userInfo', JSON.stringify(userInfo))
}

export function loadUserinfo() {
    return JSON.parse(window.sessionStorage.getItem('userInfo'))
}

export function removeUserInfo() {
    window.sessionStorage.removeItem('userInfo')
}
